package com.ecr.hub.front.bean.listener;

import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;

import org.apache.log4j.Logger;

public class PhaseRequestListener implements PhaseListener {
	
	private static final long serialVersionUID = 1L;
	public static Logger log = Logger.getLogger(PhaseRequestListener.class);
	
	@Override
	public void beforePhase(PhaseEvent evt) {
		log.debug("Avant execution phase : " + evt.getPhaseId());	
	}

	@Override
	public void afterPhase(PhaseEvent evt) {
		log.debug("Apres execution phase : " + evt.getPhaseId());		
	}
	
	@Override
	// Etre averti pour toutes les phases.
	public PhaseId getPhaseId() {
		return PhaseId.ANY_PHASE;
	}
}
